package com.hksj.aqm.constant;

public enum Pm25IndexEnum {

    LEVEL_ONE(1,"优秀"),
    LEVEL_TWO(2,"良"),
    LEVEL_THREE(3,"轻度"),
    LEVEL_FOUR(4,"中度"),
    LEVEL_FIVE(5,"重度"),
    LEVEL_SIX(6,"严重");

    private final Integer value;
    private final String remark;

    Pm25IndexEnum(Integer value, String code){
        this.value = value;
        this.remark = code;
    }

    public Integer value(){
        return this.value;
    }

    public String remark(){return this.remark;}

    public static String getRemarkByValue(Integer value){
        for (Pm25IndexEnum index : values()) {
            if (index.value().equals(value)) {
                return index.remark();
            }
        }
        return null;
    }
}


